package com.dream.cgomall.controller;

import com.dream.cgomall.service.ServiceResult;
import com.dream.cgomall.service.SmsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
public class SmsController {
    @Autowired
    SmsService smsService;
    //发送验证码
    @RequestMapping("sendSms")
    @ResponseBody
    public ServiceResult<String> sendSms(String phone){

        return smsService.sendSms(phone);
    }

}
